﻿using System.Web.Mvc;
using Web7.Domain;

namespace Web7.Core.ActionFilters.Authorization
{
    public class RouteValueUserAuthorizationFilter : RouteValueAuthorizationFilter
    {
        public RouteValueUserAuthorizationFilter(IDependencyResolver dependencyResolver)
            : base(dependencyResolver, "users", (authorization, user, authValue) => user.UserName != null && authorization.TryCheckAccess<Entity>(authValue, user, null))
        {
        }
    }
}
